package com.atguigu.common.result;

import lombok.Getter;

/**
 * className: ResultCodeEnum
 * description:
 * date: 2023/4/11 0011-22:51
 * <p>
 * project: guigu-oa-parent
 * package: com.atguigu.common
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Getter
public enum ResultCodeEnum {

    /**
     * 响应结果枚举
     */
    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    LOGIN_ERROR(208, "认证失败"),
    SERVICE_ERROR(2012, "服务异常"),
    DATA_ERROR(204, "数据异常"),

    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限");

    /**
     * 响应码
     */
    private final Integer code;

    /**
     * 响应消息
     */
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
